﻿@model SportsStore.WebUI.Models.DocumentIndexViewModel

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<h2>文档资料管理</h2>
<h4>产品类别: @Model.ProductCategory</h4>
<h4>产品名称：@Model.ProductName</h4>

<table>
@foreach (var document in Model.Documents)
{
    <tr>
        <td>
            <p>@document.Name</p>
        </td>
        <td>
            @Html.ActionLink("View","GetDocument",new{documentId=document.Id})
        </td>
        <td>
            @Html.ActionLink("Delete","DeleteDocument",new{documentId =document.Id})
        </td>

    </tr>
}
</table>
<p>@Html.ActionLink("Add New Document","AddDocument",new{productId=Model.ProductId})</p>
<p>@Html.ActionLink("返回","Index","Admin")</p>